import request from '../../utils/request'
import { createMessageType,readMessageType} from "./type.ts";
enum API{
    CREATEMESSAGE = '/message/createMessage',
    LIST = '/message/list',
    READMESSAGE = '/message/readMessage'
}

export const createMessage = (data: createMessageType) => request.post(API.CREATEMESSAGE,data)
export const list = (data: string) => request.get(`${API.LIST}?id=${data}`)
export const readMessage = (data:readMessageType) => request.post(API.READMESSAGE,data)